/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code;

import com.jili.ubert.code.server2client.MsgResult;

/**
 *
 * @author ChengJili
 */
public class ReturnIDEntity {
    public static final MsgResult Success = new MsgResult(true,0,"");
    public static final MsgResult partSuccess = new MsgResult(true,1,"部分成功");
    public static final MsgResult noExistUser = new MsgResult(false,1,"用户不存在");
    public static final MsgResult incorrectPassWord = new MsgResult(false,2,"密码错误");
    public static final MsgResult incorrectVCode = new MsgResult(false,10,"验证码错误");
    public static final MsgResult forbidWithoutReason = new MsgResult(false,3,"系统禁止");
    public static final MsgResult forbidInblacklist = new MsgResult(false,4,"登陆拒绝，用户或机器IP在黑名单中");
    public static final MsgResult forbidOutOnline = new MsgResult(false,5,"登陆拒绝，统一机器同一用户登陆数超限");
    public static final MsgResult kickOnMaxOnline = new MsgResult(false,6,"登陆被踢，原因有其他人登陆");
    public static final MsgResult kickBySystem = new MsgResult(false,7,"登陆被踢，系统管理员主动踢人");
    public static final MsgResult notEnoughFAL = new MsgResult(false,8,"可用资金不足");
    public static final MsgResult notEnoughPos = new MsgResult(false,9,"可用自持仓数据量不足");
    public static final MsgResult notDealerID = new MsgResult(false,12,"不存在的交易用户");
    public static final MsgResult notDealTrade = new MsgResult(false,13,"不支持的交易业务");
    public static MsgResult apiUnWork = new MsgResult(false,15,"");
    public static MsgResult apiUnWork(String er){
        return new MsgResult(false,15,er);
    }
    public static final MsgResult noExistMSG = new MsgResult(false,250,"未知的消息类型，系统不识别");  
    
    
    public static MsgResult noAccessTrade(char sid,String usr,String acc){
        if (sid=='2'){
            return new MsgResult(false,11,"用户:"+usr+" 对账户："+acc+" 只有查询权限，不能下单交易");
        }else{
            return new MsgResult(false,11,"用户:"+usr+" 对账户："+acc+" 没有交易权限");
        }
    }
    public static MsgResult refuseBasket(long n){
            return new MsgResult(false,14,"篮子拒绝，有"+n+"笔委托检查不通过");
    }
    public static MsgResult checkBaskets(long n){
            return new MsgResult(true,15,"篮子中，有"+n+"笔委托检查不通过，未能下单");
    }
    
    
    //客户端使用
    public static final MsgResult failLogin = new MsgResult(false,200,"没有链接服务器，不能登陆");
    public static final MsgResult failConnect = new MsgResult(false,201,"连接服务器失败");
}
